﻿using System.Collections.ObjectModel;
using JY.Wpf.Core.Tools;
using JY.Wpf.Core.ViewModelBases;
using JY.Wpf.Test.Views.ControlDemoViews;
using SD.IOC.Core.Mediators;

namespace JY.Wpf.Test.ViewModels.ControlDemoViewModels
{
    [NotifyPropertyChanged]
    public class CardDemoViewModel : ViewModelBase
    {
        #region # 变量
        
        #endregion

        #region # 构造器
        /// <summary>
        /// 构造器
        /// </summary>
        public CardDemoViewModel()
        {
            this.DataList= new ObservableCollection<CardModel>()
            {
                new CardModel
                {
                    Header = "Atomic",
                    Content = "/JY.Wpf.Test;component/Images/Album/1.jpg",
                    Footer = "Stive Morgan"
                },
                new CardModel
                {
                    Header = "Zinderlong",
                    Content = "/JY.Wpf.Test;component/Images/Album/2.jpg",
                    Footer = "Zonderling"
                },
                new CardModel
                {
                    Header = "Busy Doin' Nothin'",
                    Content = "/JY.Wpf.Test;component/Images/Album/3.jpg",
                    Footer = "Ace Wilder"
                },
                new CardModel
                {
                    Header = "Wrong",
                    Content = "/JY.Wpf.Test;component/Images/Album/4.jpg",
                    Footer = "Blaxy Girls"
                },
                new CardModel
                {
                    Header = "The Lights",
                    Content = "/JY.Wpf.Test;component/Images/Album/5.jpg",
                    Footer = "Panda Eyes"
                },
                new CardModel
                {
                    Header = "EA7-50-Cent Disco",
                    Content = "/JY.Wpf.Test;component/Images/Album/6.jpg",
                    Footer = "еяхат музыка"
                },
                new CardModel
                {
                    Header = "Monsters",
                    Content = "/JY.Wpf.Test;component/Images/Album/7.jpg",
                    Footer = "Different Heaven"
                },
                new CardModel
                {
                    Header = "Gangsta Walk",
                    Content = "/JY.Wpf.Test;component/Images/Album/8.jpg",
                    Footer = "Illusionize"
                },
                new CardModel
                {
                    Header = "Won't Back Down",
                    Content = "/JY.Wpf.Test;component/Images/Album/9.jpg",
                    Footer = "Boehm / Benjamin Francis Leftwich"
                },
                new CardModel
                {
                    Header = "Katchi",
                    Content = "/JY.Wpf.Test;component/Images/Album/10.jpg",
                    Footer = "Ofenbach / Nick Waterhouse"
                }
            };
        }
        #endregion

        #region # 属性

        /// <summary>
        ///数据列表
        /// </summary>
        public ObservableCollection<CardModel> DataList { get; set; }

        #endregion

        #region # Command方法
        #endregion

        #region # 方法

        #endregion

        #region # 获取页面 —— object GetView(object context = null)
        /// <summary>
        /// 获取页面
        /// </summary>
        /// <param name="context">页面</param>
        /// <returns></returns>
        public override object GetView(object context = null)
        {
            return ResolveMediator.Resolve<CardDemoView>();
        }
        #endregion
    }

    [NotifyPropertyChanged]
    public class CardModel
    {
        public string Header { get; set; }

        public string Content { get; set; }

        public string Footer { get; set; }
    }
}
